﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace zielonka.co.uk.extensions.system
{
    //Description:	Shortcut for System.String.Format
    /*
    //DayOfWeek sunday =  "Sunday".ToEnum<DayOfWeek>();
    */

    public static partial class StringExtensions
    {
        public static T ToEnum<T>(this string str) where T : struct
        {
            return (T)Enum.Parse(typeof(T), str);
        }
    }
}
